/*
Project: 		The Impact of Short-Term Employment for Low-Income Youth: Experimental 	
				Evidence from the Philippines
Authors: 		Emily A. Beam and Stella Quimbo

***********************************
Path: 			code
File name: 		0_master_beamquimbo.do 
***********************************

Purpose: 		Master replication do-file


Last updated: 	22 November 2021
*/


*** Master do-file for Analysis & Results

*   [Add your drive/pathway]/BeamQuimbo_ReplicationFiles"

global path "/Users/ebeam/Box Sync/BeamQuimbo_ReplicationFiles"




* All required Stata packages are available in the /code/ado folder (Reif 2021)
* https://julianreif.com/guide/#dropbox

	tokenize `"$S_ADO"', parse(";")
		while `"`1'"' != "" {
			if `"`1'"'!="BASE" cap adopath - `"`1'"'
			macro shift
		}
	
	adopath ++ "$path/code/ado"

cap mkdir "$path/results"
cap mkdir "$path/results/01_tables"
cap mkdir "$path/results/02_figures"
cap mkdir "$path/results/03_output"

* Relative paths 
global usedata_analysis 		"$path/data"
global dofiles 					"$path/code/02_analysis"
global tables_analysis 			"$path/results/01_tables"
global figures 					"$path/results/02_figures"
global output 					"$path/results/03_output"

* Relative paths 
global usedata_analysis 		"$path/data"
global dofiles 					"$path/code/02_analysis"
global tables_analysis 			"$path/results/01_tables"
global figures 					"$path/results/02_figures"
global output 					"$path/results/03_output"


version 17.0
capture log close


	
* Declare covariates 			// Necessary for all tables (except Appendix B)
/* 10 main covariates + 8 variable flags = 18 */  
#delimit; 
global cov1 "	_bb_female 		_bb_age  	_bb_workany 	_bb_workformal 
				_bb_worki 		_bb_la 		_bb_edulvl 		_bb_expected_earn 	
				_bb_expt 		_bb_othexp  
								_f_bb_age  	_f_bb_workany 	_f_bb_workformal 
				_f_bb_worki 	_f_bb_la 	_f_bb_expected_earn 
				_f_bb_expt 		_f_bb_othexp "	;
	
#delimit cr


	********			Create data 		********

	include "$path/code/01_create/01_datacleaning.do"

	********			Main Tables 		********

	include "$dofiles/table_01.do"						
	include "$dofiles/table_02.do"		
	include "$dofiles/table_03_05_06.do"				
	include "$dofiles/table_04.do"				
	include "$dofiles/table_07.do"			


	********			Appendix 		********
	
	
	include "$dofiles/figure_a01.do"
	include "$dofiles/figure_a02.do"
	

	include "$dofiles/table_a01.do"		
	include "$dofiles/table_a02.do"		
	include "$dofiles/table_a03.do"	
	include "$dofiles/table_a04.do"
	include "$dofiles/table_a05_a06.do"
	
	include "$dofiles/table_a07.do"							
	include "$dofiles/table_a08.do"
	include "$dofiles/table_a09.do"		
	include "$dofiles/table_a10.do"
	include "$dofiles/table_a11.do"
	
	include "$dofiles/table_a12.do" 						
	include "$dofiles/table_a13_a16.do"	
	include "$dofiles/table_a15.do"		
	include "$dofiles/table_b09_b10_b11.do"		

